package com.bsoft.gol.editor.controller;


import hcn.util.BaseResponse;
import com.bsoft.gol.editor.editor.request.*;
import com.bsoft.gol.editor.editor.response.*;
import hcn.rep.request.ListQueryHisReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.bsoft.gol.editor.service.EditorHisService;
import com.bsoft.gol.editor.service.InHospitalPatientService;
import com.bsoft.gol.editor.service.OutpatientDocService;

/**
 * @author ss
 * @date 2020/7/20
 */
@Controller
@RequestMapping(value = "/editorTitleOption")
public class EditorHisController {

    @Autowired
    private EditorHisService editorHisService;

    @Autowired
    private InHospitalPatientService inHospitalPatientService;

    @Autowired
    private OutpatientDocService outpatientDocService;


    @RequestMapping("/queryHospitalExamReportList")
    @ResponseBody
    public BaseResponse<HospitalExamReportListResponse> queryHospitalExamReportList(@RequestBody HospitalExamReportListRequest req) {
        return editorHisService.queryHospitalExamReportList(req);
    }

    @RequestMapping("/getExamReportDetail")
    @ResponseBody
    public BaseResponse<HospitalExamReportDetailResponse> getExamReportDetail(@RequestBody HospitalExamReportListRequest req) {
        return editorHisService.getExamReportDetail(req);
    }

    @RequestMapping("/queryHospitalLabReportList")
    @ResponseBody
    public BaseResponse<HospitalLabReportListResponse> queryHospitalLabReportList(@RequestBody HospitalLabReportListRequest req) {
        return editorHisService.queryHospitalLabReportList(req);
    }

    @RequestMapping("/getLabReportDetail")
    @ResponseBody
    public BaseResponse<HospitalLabReportDetailResponse> getExamReportDetail(@RequestBody HospitalLabReportDetailRequest req) {
        return editorHisService.getLabReportDetail(req);
    }


    /**
     * 住院患者列表
     * @return baseResponse
     */
    @RequestMapping("/inHospitalPatientList")
    @ResponseBody
    public BaseResponse<InHospitalPatientResponse> inHospitalPatientList(@RequestBody InHospitalpatientListQueryRequest request) {
        return inHospitalPatientService.queryInHospitalPatientList(request);
    }

    /**
     * 门诊患者列表
     * @return baseResponse
     */
    @RequestMapping("/outPatientList")
    @ResponseBody
    public BaseResponse<QueryOutpatientListResponse> outPatientList(@RequestBody QueryOutpatientListRequest request) {
        return outpatientDocService.queryOutpatientList(request);
    }

    /**
     * 查询指标
     * @return baseResponse
     */
    @RequestMapping("/queryIndexTree")
    @ResponseBody
    public BaseResponse queryIndexTree(@RequestBody QueryCrucialIndexRequest request) {
        return editorHisService.queryIndexTree(request);
    }

    /**
     * 门诊记录
     * @return baseResponse
     */
    @RequestMapping("/queryOutpatientRecords")
    @ResponseBody
    public BaseResponse queryOutpatientRecords(@RequestBody ListQueryHisReq req) {
        return editorHisService.queryOutpatientRecords(req);
    }

    /**
     * 住院记录
     * @return baseResponse
     */
    @RequestMapping("/queryHospitalRecords")
    @ResponseBody
    public BaseResponse queryHospitalRecords(@RequestBody ListQueryHisReq req) {
        return editorHisService.queryHospitalRecords(req);
    }

    /**
     * 查询检验、检查、治疗记录
     * @return baseResponse
     */
    @RequestMapping("/queryInspectionReportRecords")
    @ResponseBody
    public BaseResponse queryInspectionReportRecords(@RequestBody ListQueryHisReq req) {
        return editorHisService.queryInspectionReportRecords(req);
    }

    /**
     * 查询手术记录
     * @return baseResponse
     */
    @RequestMapping("/surgicalRecords")
    @ResponseBody
    public BaseResponse surgicalRecords(@RequestBody ListQueryHisReq req) {
        return editorHisService.surgicalRecords(req);
    }




}
